GET /api/admin/learn/lessons
List of Lessons

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

[
  {
    "id": 1,
    "title": "Introduction",
    "description": null,
    "video_duration": 105,
    "s3_key": null
  },
  ...
]

GET /api/admin/learn/courses/:course_id/sections/:section_id/lessons/:id
Lesson Info

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "id": 1,
  "title": "Introduction",
  "description": null,
  "video_duration": 105,
  "s3_key": null
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

section_id
required

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a Integer


POST /api/admin/learn/courses/:course_id/sections/:section_id/lessons
Create Lesson

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  lesson: {
    title: "Introduction",
    description: null,
    video_duration: 105,
    position: 1
    video: VIDEO
  }
}

Success response body

{
  "id": 1,
  "title": "Introduction",
  "description": null,
  "video_duration": 105,
  "s3_key": null
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

section_id
required

Validations:

  • Must be a Integer

lesson
required

Validations:

  • Must be a Hash

lesson[title]
required

Validations:

  • Must be a String

lesson[description]
required

Validations:

  • Must be a String

lesson[video_duration]
required

Validations:

  • Must be a Integer

lesson[position]
required

Validations:

  • Must be a Integer

lesson[video]
required

Validations:

  • Must be a File


PUT /api/admin/learn/courses/:course_id/sections/:section_id/lessons/:id
Update Lesson

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  lesson: {
    title: "Introduction",
    description: null,
    video_duration: 105,
    position: 1
    video: VIDEO
  }
}

Success response body

{
  "id": 1,
  "title": "Introduction",
  "description": null,
  "video_duration": 105,
  "s3_key": null
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

section_id
required

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a Integer

lesson
required

Validations:

  • Must be a Hash

lesson[title]
required

Validations:

  • Must be a String

lesson[description]
required

Validations:

  • Must be a String

lesson[video_duration]
required

Validations:

  • Must be a Integer

lesson[position]
required

Validations:

  • Must be a Integer

lesson[video]
required

Validations:

  • Must be a File


DELETE /api/admin/learn/courses/:course_id/sections/:section_id/lessons/:id
Destroy Lesson

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "success": true
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

section_id
required

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a Integer